package com.icitic.ns.artery.project.loan_inner_adp;

import com.icitic.artery.exceptions.AppException;

public class CreditQueryImpl implements CreditQuery {

	@Override
	public GetCreditResponse getCredit(GetCredit parameters)
			throws AppException {
		ObjectFactory of = new ObjectFactory();
		GetCreditResponse creditResponse = of.createGetCreditResponse();
		String credit = "A";
		if (parameters.getName().equals("smith")) {
			credit = "B";
		}
		creditResponse.setCredit(credit);
		return creditResponse;
	}

}
